package Ep04_String._0459;

public class Mine {
    public boolean repeatedSubstringPattern(String s) {
        if (s.length() == 1){
            return true;
        }
        StringBuilder sb = new StringBuilder();
        sb.append(s+s);
        // 掐头去尾
        sb.deleteCharAt(s.length()*2-1);
        sb.deleteCharAt(0);
        int index = sb.indexOf(s);
        if (index != -1){
            return true;
        }

        return false;
    }
}
